package com.example.roledepartment.service.impl;

import com.example.common.entity.sys.SysDept;
import com.example.roledepartment.mapper.SysDeptMapper;
import com.example.roledepartment.service.ISysDeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 部门表 服务实现类
 * </p>
 *
 * @author cc
 * @since 2022-08-12
 */
@Service
public class SysDeptServiceImpl implements ISysDeptService {

    @Autowired
    private SysDeptMapper deptMapper;

    /**
     * 通过角色id查询部门信息
     * @param roleId
     * @return
     */
    @Override
    public List<SysDept> getDeptsByRoleId(Long roleId) {
        return deptMapper.getDeptsByRoleId(roleId);
    }
}
